package com.example.zce.back;

import com.example.zce.library.data.sys.constant.BackUserEnum;
import com.example.zce.library.data.sys.entity.BackUser;
import com.example.zce.library.data.sys.service.BackUserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * 描述：
 *
 * @author zengyz
 * @date 2018/7/27 0:54
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class _BackUserService {

    @Autowired
    private BackUserService backUserService;

    @Test
    public void add() throws Exception{
        BackUser backUser=new BackUser();
        backUser.setAccount("admin@kit.com");
        backUser.setPassword("admin@kit.com");
        backUser.setRemark("初始化超级管理员");
        backUser.setState(BackUserEnum.STATE_OK.getIntegerValue());
        backUserService.saveOrUpdate(backUser);
    }
}
